-- GENERATED SPELL FOR [Boulder'mok Shaman] --


function spell0_21047(pUnit, Event) --@Bloodlust,n/a--
pUnit:FullCastSpellOnTarget(28902,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21047', 10308, 1)
end

function spell1_21047(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(11986,pUnit)
pUnit:RegisterEvent('Sorts_21047', 3000, 1)
end

function spell2_21047(pUnit, Event) --@Lightning Shield,n/a--
pUnit:FullCastSpellOnTarget(12550,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21047', 0, 1)
end

function Sorts_21047(pUnit, Event)
local choix_sorts_21047 = math.random(0, 2)
if choix_sorts_21047 == 0 then
pUnit:RegisterEvent('spell0_21047', 1, 1)
end
if choix_sorts_21047 == 1 then
pUnit:RegisterEvent('spell1_21047', 1, 1)
end
if choix_sorts_21047 == 2 then
pUnit:RegisterEvent('spell2_21047', 1, 1)
end
end

function mob21047_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21047', math.random(1500, 3000), 1)
end

function mob21047_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21047_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21047_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21047, 1, 'mob21047_Action')
RegisterUnitEvent(21047, 2, 'mob21047_Leave')
RegisterUnitEvent(21047, 3, 'mob21047_Kill')
RegisterUnitEvent(21047, 4, 'mob21047_Die')
